Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache dynamic icon styles to fix flickering #368

Merged
merged 2 commits into from
Aug 3, 2021

Conversation

raitisbe
Copy link
Contributor

@raitisbe raitisbe commented Aug 2, 2021

Description

The features start to flicker due to a longstanding bug (openlayers/openlayers#3137) in OpenLayers when using style function to set icon image and having more than 33 features. This PR fixes that problem by caching the styles using src URL as dictionary key.

Related issues or pull requests

This is a followup of #364 for issue #363

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Dependency updates
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe)
  • I am unsure (we'll look into it together)

Do you introduce a breaking change?

  • Yes
  • No
  • I am unsure (no worries, we'll find out)

Checklist

  • I understand and agree that the changes in this PR will be licensed under the BSD 2-Clause License
  • I have followed the guidelines for contributing
  • The proposed change fits to the content of the code of conduct
  • I have added or updated tests and documentation, and the test suite passes (run npm test locally)
  • I'm lost; why do I have to check so many boxes? Please help!

@raitisbe raitisbe marked this pull request as draft August 2, 2021 16:04
@raitisbe raitisbe marked this pull request as ready for review August 2, 2021 16:32
Copy link
Contributor

@jansule jansule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Thanks for the fix.

@jansule jansule merged commit 4334a0d into geostyler:master Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants